package com.limit.aspect.core;

import org.aspectj.lang.ProceedingJoinPoint;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

/**
 * @title: AnnotationAspectOperates
 * @Author xu-xiang
 * @Date: 2024/3/26 13:55
 * @description: 注解AOP统一操作规范
 */
public interface AnnotationAspectOperations {

    /**
     * 切入点
     */
    void pointcut();

    /**
     * 切入点注解类class
     */
    Class<? extends Annotation> pointcutAnnotationClass();

    /**
     * 环绕AOP
     */
    Object around(ProceedingJoinPoint joinPoint) throws Throwable;

    /**
     * 获取注解信息
     *
     * @param targetObject 目标对象
     * @param method       切入方法
     * @return 注解信息
     */
    Annotation getMergedAnnotation(Object targetObject, Method method);
}
